import 'vo/angle_axis.dart';
import 'vo/aria.dart';
import 'vo/axis.dart';
import 'vo/axis_pointer.dart';
import 'vo/brush.dart';
import 'vo/calendar.dart';
import 'vo/data_zoom.dart';
import 'vo/dataset.dart';
import 'vo/geo.dart';
import 'vo/graphic.dart';
import 'vo/grid.dart';
import 'vo/legend.dart';
import 'vo/media.dart';
import 'vo/parallel.dart';
import 'vo/parallel_axis.dart';
import 'vo/polar.dart';
import 'vo/radar.dart';
import 'vo/radius_axis.dart';
import 'vo/series/series.dart';
import 'vo/single_axis.dart';
import 'vo/state_animation.dart';
import 'vo/text_style.dart';
import 'vo/timeline.dart';
import 'vo/title.dart';
import 'vo/toolbox.dart';
import 'vo/tooltip.dart';
import 'vo/visual_map.dart';

import 'package:json_annotation/json_annotation.dart';

part 'option.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class Option {
  Title? title;
  Legend? legend;
  Grid? grid;
  Axis? xAxis;
  Axis? yAxis;
  Polar? polar;
  RadiusAxis? radiusAxis;
  AngleAxis? angleAxis;
  Radar? radar;
  List<DataZoom>? dataZoom;
  List<VisualMap>? visualMap;
  Tooltip? tooltip;
  AxisPointer? axisPoint;
  Toolbox? toolbox;
  Brush? brush;
  Geo? geo;
  Parallel? parallel;
  ParallelAxis? parallelAxis;
  SingleAxis? singleAxis;
  Timeline? timeline;
  Graphic? graphic;
  Calendar? calendar;
  DataSet? dataSet;
  Aria? aria;
  List<Series>? series;
  var color;
  var backgroundColor;
  TextStyle? textStyle;
  var animation;
  var animationThreshold;
  var animationDuration;
  var animationEasing; //枚举
  var animationDelay;
  var animationDurationUpdate;
  var animationEasingUpdate; //枚举
  var animationDelayUpdate;
  StateAnimation? stateAnimation;
  var blendModel;
  var hoverLayerThreshold;
  var useUTF;
  Option? options;
  List<Media>? media;

  Option(
      {this.title,
      this.legend,
      this.grid,
      this.xAxis,
      this.yAxis,
      this.polar,
      this.radiusAxis,
      this.angleAxis,
      this.radar,
      this.dataZoom,
      this.visualMap,
      this.tooltip,
      this.axisPoint,
      this.toolbox,
      this.brush,
      this.geo,
      this.parallel,
      this.parallelAxis,
      this.singleAxis,
      this.timeline,
      this.graphic,
      this.calendar,
      this.dataSet,
      this.aria,
      this.series,
      this.color,
      this.backgroundColor,
      this.textStyle,
      this.animation,
      this.animationThreshold,
      this.animationDuration,
      this.animationEasing,
      this.animationDelay,
      this.animationDurationUpdate,
      this.animationEasingUpdate,
      this.animationDelayUpdate,
      this.stateAnimation,
      this.blendModel,
      this.hoverLayerThreshold,
      this.useUTF,
      this.options,
      this.media});

  factory Option.fromJson(Map<String, dynamic> json) => _$OptionFromJson(json);

  Map<String, dynamic> toJson() => _$OptionToJson(this);
}
